package main

import (
	"fmt"
)

func main() {
	path := "C:\\Users\\83780\\Desktop\\page_info.ibd"

	info := AnalyseIBDFile(path)

	fmt.Printf("ibd file size: %d\n", info.Size)
	fmt.Printf("ibd file total page: %d\n", info.TotalPageNum)
	for _, page := range info.PageInfos {
		fmt.Printf("page_offset: %x \t page_type: %s \t", page.PageOffset, page.PageType)
		if page.PageType == "B+Tree Data Page" {
			fmt.Printf("row_count: %d \t page_level: %d", page.PageRowNum, page.PageLevel)
		}
		fmt.Print("\n")
	}

}
